package com.ctshk.rpc.order.bus.req;

import com.sun.org.apache.bcel.internal.classfile.Code;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;

@Data
@ApiModel(value = "WriteBusOrderDTO对象", description = "巴士填写订单DTO")
public class BusOrderWriteReq implements Serializable {
	private static final long serialVersionUID = 1L;

    @NotNull(message = "巴士产品ID不能为空")
    @ApiModelProperty(value = "巴士产品id")
    private Long busId;

    @ApiModelProperty(value = "票种类型名称")
    private String ticketTypeName;

    @ApiModelProperty(value = "出发日期")
    private LocalDate effectiveTime;

    @ApiModelProperty(value = "购买数量")
    private Integer number;

    @NotNull(message = "是否代理不能为空，1:代理,0:非代理")
    @Max(value = 1,message = "是否代理值域，1:代理,0:非代理")
    @Min(value = 0,message = "是否代理值域，1:代理,0:非代理")
    @ApiModelProperty(value = "是否代理")
    private Integer isAgent;

    @ApiModelProperty(value = "代理公司id")
    private Long agencyId;

    @ApiModelProperty(value = "代理公司")
    private String agencyCompany;

    @ApiModelProperty(value = "代理人名称")
    private String agentUserName;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "产品类型")
    private Integer productType;

    @ApiModelProperty(value = "来源")
    private Integer source;

    @ApiModelProperty(value = "销售人员id")
    private Long salesmanId;

    @ApiModelProperty(value = "销售人员名称")
    private String salesmanName;

    @NotBlank(message = "联系人姓不能为空")
    @ApiModelProperty(value = "联系人姓")
    private String surname;

    @NotBlank(message = "联系人名不能为空")
    @ApiModelProperty(value = "联系人名")
    private String name;

    @ApiModelProperty(value = "联系人姓名")
    private String contactName;

    @NotBlank(message = "联系人手机不能为空")
    @ApiModelProperty(value = "联系人手机")
    private String contactMobile;

    @ApiModelProperty(value = "联系人手机区号id")
    private Long contactMobileAreaCodeId;

    @ApiModelProperty(value = "联系人手机区号")
    private String contactMobileAreaCode;

    @ApiModelProperty(value = "联系人邮箱")
    private String contactEmail;

    @ApiModelProperty(value = "会员id")
    private String memberId;

    @Range(min = 1, max = 2, message = "会员查询类型(1:手机号查询,2:证件号码查询,null:不使用会员)")
    @ApiModelProperty(value = "会员查询类型(1:手机号查询,2:证件号码查询,null:不使用会员)")
    private Integer memberQueryType;

    @ApiModelProperty(value = "会员查询证件类型(根据CRM提供的证件类型列表)")
    private Integer memberQueryCertificatesType;

    @ApiModelProperty(value = "会员查询编码(根据memberQueryType判断)")
    private String memberQueryCode;

    @ApiModelProperty(value = "使用积分")
    private Integer usingPoints;

    @ApiModelProperty(value = "优惠卷id")
    private Long couponId;

    @ApiModelProperty(value = "备注")
    private String remark;

    @NotNull(message = "性别不能为空，1：男,2:女")
    @ApiModelProperty(value = "性别")
    private Integer gender;

    @ApiModelProperty(value = "销售方式(1：单品销售 2：打包销售)")
    private Integer salesMethods;

    @ApiModelProperty("成人数量")
    private Integer adultNum = 0;

    @ApiModelProperty("小童数量")
    private Integer childrenNum = 0;

    @ApiModelProperty("长者数量")
    private Integer oldNum = 0;

    @Valid
    @NotEmpty(message = "旅客列表不能为空")
    @ApiModelProperty(value = "旅客列表")
    private List<BusOrderTouristReq> busOrderTouristReqList;
/*
    取票方式目前、推广码、收据抬头目前没有没有接口

    @Max(value = 1,message = "取票方式，0:自取,1:邮寄")
    @Min(value = 0,message = "取票方式，0:自取,1:邮寄")
    @ApiModelProperty("取票方式")
    private String ticketDeliveryType;

    @ApiModelProperty("取票人名称")
    private String takePropleName;

    @ApiModelProperty("取票地址")
    private String ticketDeliveryAddress;

    @ApiModelProperty("取票日期")
    private LocalDateTime ticketDeliveryDate;

    @ApiModelProperty("取票人联系方式")
    private String ticketDeliveryPersonPhone;

    @ApiModelProperty("收据抬头")
    private String receiptUp;

    @ApiModelProperty("推广码")
    private String PromoCode;

*/

}
